package ext.acae2.dms.web.output;

import java.io.File;
import java.io.IOException;

import org.apache.log4j.Logger;

import wt.log4j.LogR;
import wt.util.WTProperties;

public class DownloadFileProcessor {

	private static final Logger LOGGER = LogR
			.getLogger(DownloadFileProcessor.class.getName());

	public String getDownloadPath() throws IOException {
		LOGGER.debug("> Start download");

		String downloadPath = WTProperties.getLocalProperties().getProperty(
				"wt.temp")
				+ File.separator + "dataExport";
		LOGGER.debug("downloadPath: " + downloadPath);

		File downloadFolder = new File(downloadPath);
		if (!downloadFolder.exists()) {
			LOGGER.debug("create new folder: " + downloadPath);
			downloadFolder.mkdir();
		}

		LOGGER.debug("> End download");
		return downloadPath;
	}

}
